<template>
	<view class="p-2 flex align-center flex-column justify-center" style="height: 80vh">
		<!-- 客服中心 -->
		<view class="flex flex-column align-center">
			<image style="width: 100%" src="../../static/icon/server.png" mode="widthFix"></image>
			<view class="flex">
				<view class="mx-3 bg-info px-3 py-2 rounded-circle flex justify-center" style="position: relative;">
					<text class="text-white font">在线客服</text>
					<button id="shareBtn" class="rounded-circle" open-type="contact"></button>
				</view>
				<view @click="handle" class=" mx-3 bg-info px-3 py-2 rounded-circle flex justify-center">
					<text class="text-white font">拨打电话</text>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import { mapState } from 'vuex';
	export default {
		computed: {
			...mapState(['Open_ID','App_ID','BASE_IMG','HOME_Page','shopNum']),
		},
		methods: {
			handle(){
				uni.makePhoneCall({
					phoneNumber: '01060869998'
				}).catch((e) => {
					console.log(e)  //用catch(e)来捕获错误{makePhoneCall:fail cancel}
				});
			}
		}
	}
</script>
<style>
	#shareBtn {
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		opacity: 0;
	}
</style>